<div class="path"><i class="iconfont">&#xf108;</i>  <a href="{url('admin/default/welcome')}">开始</a> / <a href="{url('module/index')}">模型管理</a> / <a href="{url('module/field',array(id=>$info['mid']))}">{$tables['name']}</a> / 字段添加</div>
<div class="m10">
<div class="table-head"><a href="{url('module/field',array(id=>$info['mid']))}" class="button"> <i class="iconfont">&#xf053;</i> 返回</a><strong>模型《{$tables['name']}》数据据表字段添加</strong></div>
<form id="form" action="{url('module/fieldedit')}">
<input type="hidden" name="fid" value="{$info['id']}" />
<input type="hidden" name="mid" value="{$info['mid']}" />
<table class="table">
    <tr><th>字段标识:</th><td><input class="input w200" datatype="s" type="text" name="name" value="{$info['name']}" /><span class="vform"></span></td></tr>
    <tr><th>字段名:</th><td><input readonly="readonly" id="fields" class="input w100 gray-input" type="text" value="{$fields}" /></td></tr>
    <tr><th>默认值:</th><td><textarea name="default_val" class="textarea w600 h80">{$info['default_val']}</textarea></td></tr>
    <tr><th><span class="red">提醒:</span></th><td class="gray p5">1、请注意默认值字段类型(数字、货币、时间默认只能是数字)。<br />2、下拉,单选,多选列表每个选项用 <span class="red">#</span> 分开,选项前面是值后面是描述,值和描述用 <span class="red">|</span> 分开。</td></tr>
    <tr><th>表单验证:</th><td class="gray fn-f14"><input id="validform" class="input w100" type="text" name="validform" value="{$info['validform']}" />
            <select class="select" id="valid" onchange="$('#validform').val($(this).val())">
              <option value="">不验证格式</option>  
              <option value="*">不能为空</option>
              <option value="*6-16">6到16位任意字符</option>
              <option value="n">数字类型</option>
              <option value="n6-16">6到16位数字</option>
              <option value="npot">支持小数点数字类型</option>
              <option value="s">字符串</option>
              <option value="s6-18">6到18位字符串</option>
              <option value="p">邮政编码</option>
              <option value="m">手机号码</option>
              <option value="e">Email验证</option>
              <option value="url">验证是否为网址</option>
              <option value="date">日期格式:YYYY-MM-DD</option>
              <option value="tel">手机或固话</option>
              <option value="alpha">只能输入英文字母;</option>
              <option value="digits">一个非负整数</option>
            </select>
<input type="radio" name="ignores" value="0"{if $info['ignores'] == 0} checked="checked"{/if}>验证空值和格式  <input type="radio" name="ignores" value="1" {if $info['ignores'] == 1} checked="checked"{/if}>仅验证格式[不验证空值]
          </td></tr>
    <tr><th><span class="red">预设:</span></th><td>
        <input type="button" value="编辑器" class="button" onclick="out(1)" />
        <input type="button" value="图片或文件上传" class="button" onclick="out(2)" />
        <input type="button" value="日期选择 YYYY-MM-DD" class="button" onclick="out(3)" />
        <input type="button" value="时间选择 YYYY-MM-DD hh:mm:ss" class="button" onclick="out(4)" />
        <input type="button" value="宽度<=w400" class="button" onclick="out(5)" />
        <input type="button" value="高度<=h200" class="button" onclick="out(6)" />
    </td></tr>
    <tr><th>CSS样式控制:</th><td><input id="inputcss" type="text" name="inputcss" class="input w300" value="{$info['inputcss']}" /><input type="button" value="清空" class="button" onclick="out(7)" /> <span class="gray">多个CSS样式用空格风格</span></td></tr>
    <tr><th>表单扩展属性:</th><td><textarea id="inputext" name="inputext" class="textarea w600 h40">{$info['inputext']}</textarea><span class="gray">表单中间的HTML</span></td></tr>
    <tr><th>表单外部控制:</th><td>
    <textarea id="inputhold" name="inputhold" class="textarea w600 h40">{$info['inputhold']}</textarea><span class="gray">表单后面的HTML</span></td></tr>
</table>
<div class="btn fn-tac">
    <a href="{url('module/field',array(id=>$info['mid']))}" class="button"> <i class="iconfont">&#xf053;</i> 返回</a>
    <input type="submit" value="确定保存" class="button button-blue" />
    <input type="reset" value="重置" class="button button-yellow" />
</div>
</form>
</div>
<script src="{PUBLIC_URL}admin/module.js"></script>
<script type="text/javascript">
  Do('base','dialog','form',function(){$('#form').forms();})  
</script>
